//只能同步
export default{
	// 登录成功
	LoginSuccess(state,data){
		state.isLogin = true
		state.userInfo = data.user
		console.log(state.userInfo)
		if(data.token != ''){
			uni.setStorageSync('token',data.token)
		}
	},
	setIsLogin(state,isLogin){
		state.isLogin = isLogin
	},
	
	//退出
	logout(state){
		state.isLogin = false
		state.userInfo = null
		uni.removeStorageSync('token')
	},
}